import request from '@/utils/request'

// 查询故障记录列表
export function listLogs(query) {
  return request({
    url: '/sys/logs/list',
    method: 'get',
    params: query
  })
}

// 查询故障记录详细
export function getLogs(faultIds) {
  return request({
    url: '/sys/logs/' + faultIds,
    method: 'get'
  })
}

// 新增故障记录
export function addLogs(data) {
  return request({
    url: '/sys/logs',
    method: 'post',
    data: data
  })
}

// 修改故障记录
export function updateLogs(data) {
  return request({
    url: '/sys/logs',
    method: 'put',
    data: data
  })
}

// 删除故障记录
export function delLogs(faultIds) {
  return request({
    url: '/sys/logs/' + faultIds,
    method: 'delete'
  })
}

export function sendLog(logg) {
  return request({
    url: '/sys/logs/' + logg,
    method: 'post'
  })
}
